package top.korori.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 
 * 媒体文件
 * 
 *
 * @author korori
 * @since 2023-10-16
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sv_media")
@ApiModel(value = "SvMedia对象", description = "媒体文件")
public class SvMedia implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("媒体id")
    @TableId(value = "media_id", type = IdType.AUTO)
    private Long mediaId;

    @ApiModelProperty("md5")
    private String md5;

    @ApiModelProperty("媒体名称")
    private String mediaName;

    @ApiModelProperty("请求路径")
    private String url;

    @ApiModelProperty("文件大小")
    private Long size;

    @ApiModelProperty("文件类型")
    private String type;

    @ApiModelProperty("状态（0 正常 1 违规）")
    private Integer status;

    @ApiModelProperty("上传者id")
    private Long userId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("是否删除")
    private Integer isDel;

    @ApiModelProperty("来源（0 前台 1 管理端）")
    private Integer source;


}
